cmake_minimum_required(VERSION 3.8)
project(cached_prop_define)

set(mycached "This is mycached value!" CACHE STRING "This is document string")
#define_property(CACHED_VARIABLE PROPERTY ADVANCED BRIEF_DOCS "brief" FULL_DOCS "full")
#set_property(CACHE mycached APPEND PROPERTY ADVANCED 1)
#get_property(var1 CACHE mycached PROPERTY ADVANCED SET)
#get_property(var2 CACHE mycached PROPERTY ADVANCED DEFINED)
#get_property(var3 CACHE mycached PROPERTY ADVANCED BRIEF_DOCS)
#get_property(var4 CACHE mycached PROPERTY ADVANCED FULL_DOCS)

define_property(CACHED_VARIABLE PROPERTY my_prop BRIEF_DOCS "brief" FULL_DOCS "full")
#set_property(CACHE mycached APPEND PROPERTY my_prop 1)
get_property(var1 CACHE mycached PROPERTY my_prop SET)
get_property(var2 CACHE mycached PROPERTY my_prop DEFINED)
get_property(var3 CACHE mycached PROPERTY my_prop BRIEF_DOCS)
get_property(var4 CACHE mycached PROPERTY my_prop FULL_DOCS)

message(STATUS "var1 = ${var1}")
message(STATUS "var2 = ${var2}")
message(STATUS "var3 = ${var3}")
message(STATUS "var4 = ${var4}")
